According to Simon Marshall (S.Marshall@sequent.cc.hull.ac.uk):
\begin{quote}
Like GNU & X11 stuff, epoch is available in the UK from
uk.ac.ic.doc.src (00000510200001). You can log on; there's help to
tell you the different ways of getting source. Epoch is in
/gnu/epoch.
\end{quote}
Epoch is also available from
/anonymous@aix370.rrz.uni-koeln.de:gnu/emacs/epoch or
/anonymous@134.95.132.2:gnu/emacs/epoch
Volunteers for other FTP sites outside the United States, or for
mail access to Epoch source, please step forward.
\node What is the latest version of Epoch?, Moving to Epoch 4 broke some lisp code that worked before, How can I get Epoch?, Epoch and GNU Emacs
\cindex{What is the latest version of Epoch?}
\cindex{Version of Epoch}
\cindex{Epoch Version}
\subsection{What is the latest version of Epoch?}
The latest version is 4.2. Previous versions still in use by some
people include 4.0 patchlevels 0,1, and 2, 4.1, the 4.0 alpha and beta
levels, and version 3.2.
Epoch 4.2 is based on GNU Emacs 18.58, which is the most recent
version of GNU Emacs.
Existing installations of Epoch 4.1 should be upgraded to 4.2 as
soon as possible.
\node Moving to Epoch 4 broke some lisp code that worked before, I switched Epoch versions and my X resources are being ignored, What is the latest version of Epoch?, Epoch and GNU Emacs
\cindex{Moving to Epoch 4 broke some lisp code that worked before}
\cindex{Emacs Lisp}
\cindex{Buttons}
\cindex{Zones}
\cindex{Function names changed}
\subsection{Moving to Epoch 4 broke some lisp code that worked before}
In one of the beta versions of epoch, the term "button" was replaced
by the term "zone". The idea was, "button" was misleading (since it
refered to a mouse button or a pushbutton as well). It didn't really
describe Epoch's attributed text.
As a consequence, the names of all the button-related function names
and variables were changed. There are two ways to deal with this
change:
\subsubsection{Fset the function names}
Put the following command at the head of each file of elisp code
that uses buttons:
\begin{verbatim}
(require 'button)
\end{verbatim}
This simply does a series of fset's to replace the "button" names with
the new "zone" names.
\subsubsection{Edit the source}
Convert all references of "button" to "zone". You can use the
function convert-current-buffer in epoch-lisp/convert-buttons.el (in
the Epoch distribution) to do this automatically.
NOTE: There may be additional problems; in particular, since
attributes were eliminated in Epoch 4.0, any use of them will have to
be eliminated also. This is less simple than switching from buttons
to zones. Fortunately, most Epoch packages on the net now support
4.0. Therefore, I won't bother to come up with an answer for this one
(unless someone actually needs to know).
\node I switched Epoch versions and my X resources are being ignored, What's the difference between Epoch and GNU Emacs version 19?, Moving to Epoch 4 broke some lisp code that worked before, Epoch and GNU Emacs
\cindex{I switched Epoch versions and my X resources are being ignored}
\cindex{X Resources ignored}
\cindex{Ignored resources}
\cindex{New version}
\subsection{I switched Epoch versions and my X resources are being
ignored}
From Martin Boyer (mboyer@ireq-robot.hydro.qc.ca):
Old versions of Epoch extracted its X default resources from
the user's .Xdefaults file by hand; this is no longer the case. If
Epoch isn't picking up resources like previous versions did on your
system, prior to starting Epoch do this:
\begin{verbatim}
xrdb -merge $HOME/.Xdefaults
\end{verbatim}
This makes the X server's database pick up and maintain all of the
resource definitions found in $HOME/.Xdefaults.
Alternatively, you can use the '-ud' command line flag to force
Epoch to manually scan $HOME/.Xdefaults.
A second problem is that Epoch uses the first word in the command
that executed Epoch (argument 0) to search the X resource database for
Epoch resources. Thus, if you invoke Epoch with the name:
\begin{verbatim}
epoch-4.2
\end{verbatim}
Epoch will use the string 'epoch-4.2' to search the resource
database, thereby missing the resources specified by the name 'epoch'.
The workaround is to use the '-name' or '-rn' command-line option like
\begin{verbatim}
epoch-4.2 -name epoch
\end{verbatim}
\begin{verbatim}
epoch-4.2 -rn epoch
\end{verbatim}
Using -name is more recommended, as it is a sort-of standard option
among X applications (most X Toolkit applications support it).
\node What's the difference between Epoch and GNU Emacs version 19?, , I switched Epoch versions and my X resources are being ignored, Epoch and GNU Emacs
\cindex{What's the difference between Epoch and GNU Emacs version 19?}
\cindex{Lucid Emacs}
\cindex{Emacs 19}
\cindex{GNU Emacs 19}
\subsection{What's the difference between Epoch and GNU Emacs version
To quote directly from the GNU 'status' file (obtained via anonymous
FTP as /anonymous@prep.ai.mit.edu:pub/gnu/status or
/anonymous@18.71.0.38:pub/gnu/status):
\begin{quotation}
Emacs 18 maintenance continues for simple bug fixes. Version 19
approaches release, counting among its new features before and after
change hooks, source-level debugging of Emacs Lisp programs, X
selection processing, including CLIPBOARD selections, scrollbars,
support for European character sets, floating point numbers,
per-buffer mouse commands, interfacing with the X resource manager,
mouse-tracking, lisp-level binding of function keys, and multiple X
windows (`screens' to emacs).
Thanks go to Alan Carroll and the people who worked on Epoch for
generating initial feedback to a multi-windowed emacs. Emacs 19
supports two styles of multiple windows, one with a separate screen
for the minibuffer, and another with a minibuffer attached to each
screen.\cindex{Carroll, Alan}
A couple of other features of Version 19 are buffer allocation, which
uses a new mechanism capable of returning storage to the system when a
buffer is killed, and a new input system--all input now arrives in the
form of Lisp objects.
Other features under consideration for later releases of Version 19
include:
\begin{itemize}
\item Associating property lists with regions of text in a buffer.
\item Multiple font, color, and pixmaps defined by those properties.
\item Different visibility conditions for the regions, and for various
windows showing one buffer.
\item Hooks to be run if point or mouse moves outside a certain range.
\item Incrementally saving undo history in a file, so that recover-file
also reinstalls buffer's undo history.
\item Static menu bars, and better pop-up menus.
\end{itemize}
\end{quotation}
Epoch currently supports much of the new functionality of GNU Emacs
v19, including some features that apparently won't be immediately
available in GNU Emacs v19 (notably, associating property lists with
regions of text, and multiple fonts/colors/pixmaps defined by those
properties).
A postscript to this answer is a message that Richard Stallman
(Mr. Gnu himself) posted to gnu.emacs.help in Apr 1992:
\begin{quotation}
Emacs 19 won't support text highlighting, but a later version will.
We have code basically working for attaching arbitrary properties to
parts of the text, including choice of font and color.
This feature is designed for attributes which are considered part of
the text itself. What Epoch provides is highlighting that is part
of the presentation of the text, not logically part of the text itself.
That is useful also; I hope we will find the wherewithal to implement
that along with the other highlighting features.
\end{quotation}
There is also a version of Emacs 19 written by Lucid. Called "Lucid
Emacs", this is something from its README about it:
\begin{quotation}
Lucid GNU Emacs 19.3 is now available. This is a version of GNU
Emacs derived from an early version of Emacs version 19 from the
Free Software Foundation.
You can get it via anonymous FTP from the host labrea.Stanford.EDU
(36.8.0.47). It is currently available only by FTP. We don't have
the manpower to make tapes right now.
Log in with the user "anonymous" and "username@host" as a password
(that is, your email address.) Execute the command "cd
pub/gnu/lucid/". These are the files you will find there:
lemacs-19.3.tar.Z
The complete source distribution. This file is about 8 megabytes.
When untarred and uncompressed, the source distribution will take up
about 20 megs. You will need an additional 12 megs or so to compile it.
lemacs-19.3-sun4.tar.Z
This is a ready-to-run set of Sun4 executables, and a DOC file. If
you want to use these executables, you will still need to get the file
lemacs-19.3.tar.Z, because Emacs cannot function very well without the
lisp library online. This file is about 1.7 megs, 3.8 megs when
unpacked, 3 megs of which is the Emacs executable itself (2.1 megs if
stripped.)
Don't forget to set "binary" mode when transferring these files.
Unpack them with some variation of the command "zcat
lemacs-19.3.tar.Z | tar -vxf -".
.... [edit out info on lucid emacs mailing lists] ....
Why Another Version of Emacs?
=============================
Lucid's latest product, Energize, is a C/C++ development
environment. Rather than invent (and force our users to learn) a
new user-interface, we chose to build part of our environment on top
of the world's best editor, GNU Emacs. (Though our product is
commercial, the work we did on GNU Emacs is free software, and is
useful without having to purchase our product.)
We needed a version of Emacs with mouse-sensitive regions, multiple
fonts, the ability to mark sections of a buffer as read-only, the
ability to detect which parts of a buffer has been modified, and
many other features.
Why Not Epoch?
==============
For our purposes, the existing version of Epoch was not sufficient;
it did not allow us to put arbitrary pixmaps/icons in buffers,
`undo' did not restore changes to regions, regions did not overlap
and merge their attributes in the way we needed, and several other
things.
We could have devoted our time to making Epoch do what we needed
(and, in fact, we spent some time doing that) but, since the FSF
planned to include Epoch-like features in their version 19, we
decided that our efforts would be better spent improving Emacs19
instead of Epoch.
Our original hope was that our changes to Emacs would be
incorporated into the "official" v19. However, scheduling conflicts
arose, and we found that, given the amount of work still remaining
to be done, we didn't have time to merge with the FSF's code.
Consequently, we have released our work as a forked branch of Emacs,
instead of delaying any longer.
It seems likely that a merger of Epoch and Lucid Emacs will occur in
the not-too-distant future.
\end{quotation}
\node Configuring Epoch, Windows, Epoch and GNU Emacs, Top
\cindex{Configuring Epoch}
\section{Configuring Epoch}
\begin{menu}
* How can my .emacs file deal with both GNU Emacs and Epoch?::
* How can I configure Epoch to support full 8-bit character sets?::
* How can I cut and paste between Epoch and OpenLook?::
\end{menu}
\node How can my .emacs file deal with both GNU Emacs and Epoch?, How can I configure Epoch to support full 8-bit character sets?, , Configuring Epoch
\cindex{How can my .emacs file deal with both GNU Emacs and Epoch?}
\cindex{Handling Epoch-specific code}
\cindex{.emacs file}
\subsection{How can my .emacs file deal with both GNU Emacs and Epoch?}
An easy way to handle both GNU Emacs and Epoch within the same .emacs
file is to define a variable 'running-epoch' as follows:
\begin{verbatim}
(defvar running-epoch (boundp 'epoch::version))
\end{verbatim}
Then, the rest of your .emacs file can look like this:
\begin{verbatim}
(if running-epoch
(progn
... [Epoch-specific code here] ...
))
... [Emacs code here] ...
\end{verbatim}
(After this, when I refer to 'your .emacs file', read that as 'the
Epoch-specific portion of your .emacs file', under the assumption that
you have both general and Epoch-specific parts as detailed above.)
If you have a large amount of Epoch-specific code it may be better to
put it in a separate file (e.g., "epoch-specific.el"), possibly
byte-compile it, then load it from your .emacs file like so:
\node How can I configure Epoch to support full 8-bit character sets?, How can I cut and paste between Epoch and OpenLook?, How can my .emacs file deal with both GNU Emacs and Epoch?, Configuring Epoch
\cindex{How can I configure Epoch to support full 8-bit character sets?}
\cindex{8-bit characters}
\cindex{Eight-bit characters}
\cindex{Character display and input}
\cindex{Display and input of characters}
\cindex{Input and display of characters}
\subsection{How can I configure Epoch to support full 8-bit character
sets?}
There are two parts to this: display and input.
Display is handled by the variables "meta-printable" and "ctl-arrow".
From the documentation string for "meta-printable":
\begin{quotation}
Non-nil means meta characters, that is characters in the range
0240..0377, are printable. Nil means display meta chars with
backslash and octal digits. Automatically becomes local when set in
any fashion.
\end{quotation}
From the documentation string for "ctl-arrow":
\begin{quotation}
t means display control chars with uparrow. Nil means use backslash
and octal digits. Automatically becomes local when set in any
fashion.
\end{quotation}
Input is handled by the flag "EIGHTBIT_KEYBOARD", which is set in config.h:
\begin{verbatim}
/* Define EIGHTBIT_KEYBOARD if you want keys in range 0240 to 0377
* to insert corresponding eight-bit characters.
*/
/* #define EIGHTBIT_KEYBOARD */
\end{verbatim}
Define this flag only if you are using a keyboard with direct support
for 8-bit characters.
\node How can I cut and paste between Epoch and OpenLook?, , How can I configure Epoch to support full 8-bit character sets?, Configuring Epoch
\cindex{OpenLook}
\cindex{Cut and Paste}
\subsection{How can I cut and paste between Epoch and OpenLook?}
Arnold Smith (smith@cam.sri.com) says:
\cindex{Smith, Arnold}
\begin{quote}
Yes it works easily enough, it's just a little awkward in terms of
the operations required. Here's the relevant excerpt from my
epoch-tailoring file (I use a Sun SPARCstation IPX running SunOS
4.1.2 and OW):
\end{quote}
\begin{verbatim}
;; Allow cut and paste selections to come from OpenLook windows, by using
;; CLIPBOARD rather than the default PRIMARY. From the epoch 4.0 manual...
;; The above still doesn't make things entirely simple. To get text from
;; an epoch window into a cmdtool or shelltool window, select it by wiping
;; the cursor across the source selection while holding down the left
;; mouse key. Then move the cursor into the destination window and press
;; the "Paste" key on the left-hand side of the keyboard. To copy text in
;; the other direction, select it similarly in the cmdtool window, press
;; the "Copy" key, move the cursor to the epoch window, and press the
;; middle mouse button where you want the text to appear. (Sometimes I
;; have to actually hold the middle mouse button down for a fraction of a
;; second---a light click doesn't always seem to register).
\end{verbatim}
\node Windows, Colors and Fonts, Configuring Epoch, Top
\cindex{Windows}
\section{Windows}
\begin{menu}
* How do I get the minibuffer back at the bottom of my edit window?::
* How do I prevent the initial edit window from appearing?::
* How do I stop the windows from automatically raising upon entry?::
* How do I change the cursor?::
* How do I define edit screen attributes on a per-mode basis?::
* How do I make Epoch manage edit window and icon names based on the name of the current buffer(s)?::
* How do I iconify my entire Epoch session at once?::
* Does Epoch support scrollbars?::
* How can I make more room for windows?::
\end{menu}
\node How do I get the minibuffer back at the bottom of my edit window?, How do I prevent the initial edit window from appearing?, , Windows
\cindex{How do I get the minibuffer back at the bottom of my edit window?}
\cindex{One minibuffer window}
\cindex{Minibuffer window}
\subsection{How do I get the minibuffer back at the bottom of my edit
window?}
Start Epoch with the command-line option '-nm'. Alternately, in your
general .Xdefaults file, specify:
\begin{example}
epoch.nonlocal.minibuf: False
\end{example}
\node How do I prevent the initial edit window from appearing?, How do I stop the windows from automatically raising upon entry?, How do I get the minibuffer back at the bottom of my edit window?, Windows
\cindex{How do I prevent the initial edit window from appearing?}
\cindex{Inital edit window}
\cindex{First window}
\subsection{How do I prevent the initial edit window from appearing?}
In other words, how do I get only the minibuffer upon startup?
There is a variable that controls whether or not an initial edit
window will be provided. By default, of course, one is; to stop this
from happening, put the following in your .emacs:
\begin{verbatim}
(setq inhibit-initial-screen-mapping t)
\end{verbatim}
This will have no effect if you're using local minibuffers (i.e. when
the minibuffer is a part of each edit window), as described above.
[Thanks to Chris Love (love@cs.uiuc.edu).]\cindex{Love, Chris}
\node How do I stop the windows from automatically raising upon entry?, How do I change the cursor?, How do I prevent the initial edit window from appearing?, Windows
\cindex{How do I stop the windows from automatically raising upon entry?}
\cindex{Windows pop up, stopping}
\cindex{Pop up windows, stopping}
\cindex{Windows raise on entry}
\cindex{On entry, windows raise}
\subsection{How do I stop the windows from automatically raising upon
entry?}
Specify the following in your .emacs file:
\begin{verbatim}
(setq auto-raise-screen 'minibuf)
\end{verbatim}
This makes the minibuffer raise when an Epoch edit window is
entered; if you don't want the minibuffer to raise itself either, do
the following instead:
\begin{verbatim}
(setq auto-raise-screen nil)
\end{verbatim}
\node How do I change the cursor?, How do I define edit screen attributes on a per-mode basis?, How do I stop the windows from automatically raising upon entry?, Windows
\cindex{How do I change the cursor?}
\cindex{Cursor, changing it}
\cindex{Changing the cursor}
\subsection{How do I change the cursor?}
Another noticeable change from GNU Emacs is the cursor glyph (which is
a pencil shape). To change this to a more normal-appearing arrow
NOTE: You can specify a different cursor glyph for the minibuffer,
if you like.
There are also X resources for the screen and minibuffer cursor
glyphs; equivalent to the above elisp code would be the following (in
your .Xdefaults file):
\begin{example}
epoch.screen.cursor.glyph: 68
epoch.minibuf.cursor.glyph: 68
\end{example}
For either of these approaches, any valid cursor ID number will do; to
see the available cursors and their ID numbers, take a look at the
file /usr/include/X11/cursorfont.h.
(\pxref{How do I define edit screen attributes on a per-mode
basis?}, for details on how to customize the cursor glyph based on
the mode of a screen's initial buffer.)
\node How do I define edit screen attributes on a per-mode basis?, How do I make Epoch manage edit window and icon names based on the name of the current buffer(s)?, How do I change the cursor?, Windows
\cindex{How do I define edit screen attributes on a per-mode basis?}
\cindex{Screen attributes}
\cindex{Window attributes}
\cindex{Per-mode window attributes}
\subsection{How do I define edit screen attributes on a per-mode basis?}
Or, how do I make my C++ edit windows come up with 48 lines and a big
round dot for a cursor?
You can define styles for new edit screens created with
find-file-other-screen (which is, by default, bound to 'C-z 4 C-f' and
'C-z 4 f') based on the initial buffer's mode like so:
\begin{verbatim}
(setq epoch-mode-alist
(append (list
(cons 'c-mode
(list
(cons 'geometry "80x52")
(cons 'cursor-glyph 94)))
(cons 'LaTeX-mode
(list
(cons 'geometry "90x48")
(cons 'cursor-glyph 58)))
(cons 'c++-mode
(list
(cons 'geometry "80x48")
(cons 'cursor-glyph 38))))
epoch-mode-alist))
\end{verbatim}
\node How do I make Epoch manage edit window and icon names based on the name of the current buffer(s)?, How do I iconify my entire Epoch session at once?, How do I define edit screen attributes on a per-mode basis?, Windows
\cindex{How do I make Epoch manage edit window and icon names based on the name of the current buffer(s)?}
\cindex{Window and icon names}
\cindex{Icon and window names}
\cindex{Names of icons and windows}
\subsection{How do I make Epoch manage edit window and icon names based
on the name of the current buffer(s)?}
The base Epoch distribution doesn't support this, but there have
been a number of small packages written that accomplish this. There
is one written by Derek Ney (derek@boingo.med.jhu.edu) up for
anonymous FTP at ftp.ncsa.uiuc.edu (141.142.20.50) as
/outgoing/marca/epoch/derek-title.el.Z. Another one can be found in
the epoch sources at ftp.uu.net (in the directory
/languages/emacs-lisp/epoch).
\node How do I iconify my entire Epoch session at once?, Does Epoch support scrollbars?, How do I make Epoch manage edit window and icon names based on the name of the current buffer(s)?, Windows
\cindex{How do I iconify my entire Epoch session at once?}
\cindex{Iconifying all of epoch}
\subsection{How do I iconify my entire Epoch session at once?}
By default, 'C-z i' is bound to iconify-screen, which only iconifies
the current edit window. To iconify everything, define a small
function iconify-everything in your .emacs file like so:
\begin{verbatim}
(defun iconify-everything ()
"Iconify entire Epoch session at once."
(interactive)
(dolist (s (screen-list))
(iconify-screen s))
(iconify-screen 0)
)
\end{verbatim}
Then bind it to a key sequence (e.g. \key{C-z C-i}) like so:
\begin{verbatim}
(global-set-key "\C-z\C-i" 'iconify-everything)
\end{verbatim}
\node Does Epoch support scrollbars?, How can I make more room for windows?, How do I iconify my entire Epoch session at once?, Windows
\cindex{Does Epoch support scrollbars?}
\cindex{Scrollbars, support of}
\subsection{Does Epoch support scrollbars?}
No; native support for scrollbars is a technical challenge that so far
no one has taken up for either GNU Emacs or Epoch.
Alternatively, pick up the widgets package from cs.uiuc.edu, in
pub/epoch-files/widgets/widgets.tar.Z. This is a Motif-only "widget
server" that epoch can talk to. It will produce a nice Motif
scroll-bar on the side of your epoch screen. It does a lot more, but
as far as I can tell, that's all it does out of the box (i.e., without
writing some lisp code). Somebody correct me if I'm wrong, here.
[Thanks to Pierre Bondono (bondono@vnet.ibm.com) for the following:]
\cindex{Bondono, Pierre}
Related to this, there is a ``scrolling concept'' inside the IMOUSE
packages that may be of interest. IMOUSE can be found via anonymous
FTP from ireq-robot.hydro.qc.ca (131.195.2.130); see question H-1
below.
\node How can I make more room for windows?, , Does Epoch support scrollbars?, Windows
\cindex{How can I make more room for windows?}
\cindex{Window room}
\cindex{Rooms}
\cindex{Virtual Screens}
\subsection{How can I make more room for windows?}
My workstation's screen area is overwhelmed by all the windows I
reate in my Epoch editing sessions. How can I squeeze more windows
into my working environment?
This is only a half-facetious question; there's only room on most
workstation screens (usually 1024x768 or 1280x1024 pixels in area) for
a couple of windows with decent-sized fonts. To help alleviate the
discomfort of cramped space, try the 'tvtwm' window manager. (I sound
like a cough-drop commercial.)
Tvtwm, a superset of the twm window manager, allows windows to be
placed on a virtual root window that can be of any size (for example,
3000 by 3000 pixels). This virtual root can be navigated via tvtwm's
'panner', a reduced-size overview of your entire environment.
Tvtwm can be found on your local comp.sources.x archive or in the
X11R4 and X11R5 distributions. Try anonymous FTP to ftp.uu.net
(137.39.1.9) in /usenet/comp.sources.x.
For those people that actually like the OpenLook window manager :-),
a similarly modified version of Olwm can be found in ftp.uu.net
/usenet/comp.sources.x/volume14/olvwm (and a lot of other places,
too).
People running on HP workstations can use the rooms metaphor built
into the vuewm. A similar, but less powerful alternative is the vr
program in the contrib directory at export.lcs.mit.edu. It, however,
doesn't support spreading epoch windows around different rooms.
\node Colors and Fonts, Menus, Windows, Top
\cindex{Colors and Fonts}
\section{Colors and Fonts}
\begin{menu}
* How do I interactively select my foreground color?::
* How do I switch fonts interactively?::
* How can I associate a certain foreground color with a file?::
* How do I design my own really funky technicolor modeline?::
* How do I replace the mouse region selection underlining with a different style?::
\end{menu}
\node How do I interactively select my foreground color?, How do I switch fonts interactively?, , Colors and Fonts
\cindex{How do I interactively select my foreground color?}
\cindex{Foreground color, interactively setting}
\cindex{Interactively setting foreground color}
\subsection{How do I interactively select my foreground color?}
First, define a style for each of your desired foreground colors in
your .emacs file, like so:
\begin{verbatim}
(setq red-style (make-style))
(set-style-foreground red-style "red")
\end{verbatim}
Then, define a short command 'goto-style' like so:
This binds a command that changes the current foreground color to red
to the key sequence \key{C-c 1}.
The following function allows you to interactive specify a new color
for the current buffer's foreground:
\begin{verbatim}
(defun set-foreground (newfg)
"Set current foreground color to NEWFG."
(interactive "sForeground color: ")
(set-style-foreground buffer-style newfg)
(redraw-display))
\end{verbatim}
This function is activated by typing:
\begin{example}
M-x set-foreground
\end{example}
Or, it can be bound to a key like so:
\begin{verbatim}
(global-set-key "\C-z\C-s" 'set-foreground)
\end{verbatim}
\node How do I switch fonts interactively?, How can I associate a certain foreground color with a file?, How do I interactively select my foreground color?, Colors and Fonts
\cindex{How do I switch fonts interactively?}
\cindex{Fonts, switching interactively}
\cindex{Switching fonts interactively}
\cindex{Changing fonts interactively}
\subsection{How do I switch fonts interactively?}
To change fonts, you don't have to define new styles. Just define a
This changes the current edit window's font to "8x13" when the key
sequence 'C-c 1' is entered.
The following function allows you to interactively input a font name:
\begin{verbatim}
(defun set-font (newfont)
"Set current font to NEWFONT."
(interactive "sFont name: ")
(font newfont)
(redraw-display))
\end{verbatim}
This function is activated by typing:
\begin{example}
M-x set-font
\end{example}
Or, it can be bound to a key like so:
\begin{verbatim}
(global-set-key "\C-z\C-s" 'set-font)
\end{verbatim}
If the font you specify with either of these methods isn't valid for
your X server (i.e. if the font doesn't exist in a directory listed in
your X server's font path and in that directory's fonts.dir file, or
isn't available from the font server if you're running X11R5), you
will get this message in your minibuffer:
\begin{example}
Bad font name
\end{example}
Font names are ordinary X font names; for example, a 14-point non-bold
non-italic Helvetica font can be referred to as:
\begin{example}
"*helvetica-medium-r-normal--14*"
\end{example}
The standard X client 'xlsfonts' will give you a list of the fonts
registered with your X server. The standard X client 'xfontsel' lets
you interactively put together an X font specification string based on
individual attributes (e.g., family, size).
\node How can I associate a certain foreground color with a file?, How do I design my own really funky technicolor modeline?, How do I switch fonts interactively?, Colors and Fonts
\cindex{How can I associate a certain foreground color with a file?}
\cindex{Files, associating colors with}
\cindex{Associating colors with files}
\cindex{Coloring files}
\subsection{How can I associate a certain foreground color with a file?}
So that every time I load that file my foreground color is
automatically set?
You can easily do this by using GNU Emacs' ability to handle file
variables. For example, if you have defined style 'red-style' to
specify a red foreground color, and want file 'foobar.c' to always
have the foreground color red, add this to the bottom of 'foobar.c':
\begin{verbatim}
^L
/*
Local Variables:
buffer-style: red-style
End:
*/
\end{verbatim}
NOTE: '^L' is a newline character; you can enter one in an edit
buffer by typing \key{C-q C-l}.
Then, whenever 'foobar.c' is loaded, the variable 'buffer-style' will
be set to 'red-style', and as a result the foreground color for that
buffer will be red.
\node How do I design my own really funky technicolor modeline?, How do I replace the mouse region selection underlining with a different style?, How can I associate a certain foreground color with a file?, Colors and Fonts
\cindex{How do I design my own really funky technicolor modeline?}
\cindex{Modeline, customizing and coloring}
\subsection{How do I design my own really funky technicolor modeline?}
Using the tried-and-true Learning By Example(tm) educational method,
I'll just give the (heavily commented) elisp code I use to define my
own customized modeline:
\begin{verbatim}
;; A style to emphasize things I find important
(defvar mode:*hilight-style* (make-style)
"Style for modeline hilights"
(let ((s1 mode:*hilight-style*))
;; Do something reasonable if we're on a monochrome screen
(if (> (epoch::number-of-colors) 2)
(progn
(set-style-foreground s1 "#83558c")
(set-style-background s1 (foreground)))
(progn
(set-style-foreground s1 (background))
(set-style-background s1 (foreground))))
(set-style-font s1 "*helvetica-bold-r-*-*-12-*")
;; A style for normal modeline contents -- inverted from normal
\node How do I replace the mouse region selection underlining with a different style?, , How do I design my own really funky technicolor modeline?, Colors and Fonts
\cindex{How do I replace the mouse region selection underlining with a different style?}
\cindex{Mouse selection attributes, changing}
\cindex{Changing mouse selection attributes}
\subsection{How do I replace the mouse region selection underlining with
a different style?}
The appearance of the region underlined with the mouse is described
by the style in the variable "motion::style". You can use the normal
style functions to manipulate this variable. For example, you can
turn off underlining with the following:
\begin{verbatim}
(set-style-underline motion::style nil)
\end{verbatim}
Now, nothing will show up. To have just the text foreground color
change on mouse selection, do:
\begin{verbatim}
(set-style-foreground motion::style "yellow")
(set-style-background motion::style (background))
\end{verbatim}
Replace "yellow" with any desired X color name.
To have the selected region appear as reverse video, try:
\begin{verbatim}
(set-style-foreground motion::style (background))
(set-style-background motion::style (foreground))
\end{verbatim}
To have the selected region appear with an overlayed diagonal stipple
pattern, try:
\begin{verbatim}
(set-style-background motion::style "red")
(set-style-background-stipple motion::style
(make-bitmap 4 4 "\\167\\273\\335\\356"))
\end{verbatim}
The style bound to motion::style has default settings as follows:
\begin{verbatim}
(set-style-foreground motion::style (foreground))
(set-style-background motion::style (background))
(set-style-underline motion::style (foreground))
\end{verbatim}
\node Menus, Keyboard, Colors and Fonts, Top
\cindex{Menus}
\section{Menus}
\begin{menu}
* Does Epoch support popup menus or menubars?::
\end{menu}
\node Does Epoch support popup menus or menubars?, , , Menus
\cindex{Does Epoch support popup menus or menubars?}
\cindex{Menubars, support of}
\cindex{Popup menus, support of}
\subsection{Does Epoch support popup menus or menubars?}
The base Epoch distribution does not have native support for popup
menus or menubars. However, there are other ways to use menus with
Epoch.
\subsubsection{Use gwm}
If you're running the window manager GWM (available via anonymous
FTP to export.lcs.mit.edu (18.24.0.12) in /contrib/gwm), you can use
the Epoch contrib 'wm-menu' package (found in the contrib tar file on
cs.uiuc.edu) to have GWM provide menus that pass messages to Epoch.
\subsubsection{Use another window manager with xse or gnudoit}
If you're running a window manager that has user-specifiable menus
(as all of the common window managers do), you can perform particular
commands from a menu. These commands can communicate with epoch, and
get it to do things.
One way to do this is to use "xse" (XSendEvent) and send characters
that happen to be bound to the commands you want to activate. To bind
arbitrary commands to menu entries in this manner, you need to define
a unique keystroke pattern (with global-set-key) for each command and
then send that keystroke pattern with xsendevent via the menu. See
the section on rebind-key (below) for more information on this
technique. (Of course, you are also free to have xsendevent send a
key sequence like 'ESC x u n d o RET' directly to Epoch.)
A better way is to use gnudoit, which communicates to gnuserv.
Gnuserv, gnuclient, and gnudoit are replacements for emacsclient and
its server. With gnudoit, you can pass in an Emacs Lisp form to
evaluate, rather than the less readable X Event description for a key
binding.
Some window managers (such as TWM) do not allow the user to specify
client-specific menus -- you can only add menus to all clients. This
is not an ideal solution, since all windows (Epoch or not) in the
session will have the menu attached to them, but it does work and is
quite convenient for use with Epoch. Other window managers (Mwm in
particular) allow you to specify a menu on a client-by-client basis.
Thus, you can have different menus on terminal windows from on Epoch
(Mwm will even let you have different menus on different screens and
on the minibuffer).
Here's a couple of sample Twm menu descriptions. Note that these
would show up on all applications that have title bars.
This makes C-h (the backspace key as well as the Control-h key
sequence) delete characters backward, and shifts responsibility for
help to C-x h. This fix will work for GNU Emacs as well as Epoch.
If you don't like to have your backspace key also untabify (i.e.,
convert tabs to spaces on the fly), use this instead of the previous
global-set-key for C-h:
\begin{verbatim}
(global-set-key "\C-h" 'backward-delete-char)
\end{verbatim}
\subsubsection{Use xmodmap}
Outside of Epoch, you can change the X representation of the
BackSpace key into a Delete by doing this:
\begin{example}
xmodmap -e "keysym BackSpace = Delete"
\end{example}
This approach has the disadvantage of not being done inside
of Epoch for those who prefer customizing lisp code to customizing
their system environments.
[Thanks to Joe Wells (jbw@bigbird.bu.edu).]\cindex{Wells, Joe}
\node How can I use Page Up and Page Down keys?, How can I stop function keys from putting garbage in my buffer?, How do I make the backspace key work properly?, Keyboard
\cindex{How can I use Page Up and Page Down keys?}
\cindex{Using Page Up and Page Down}
\cindex{Page up or down keys, using}
\subsection{How can I use Page Up and Page Down keys?}
How do I make the keys marked "Page Up" and "Page Down" on an IBM
Selectric-style keyboard do their jobs?
Using the key rebinding facility discussed below, you can put the
following two lines in your .emacs file:
\begin{verbatim}
(rebind-key "Prior" nil "\M-v") ; Note Prior, not Page Up.
(rebind-key "Next" nil "\C-v") ; Note Next, not Page Down.
\end{verbatim}
Similarly, if you want "Home" and "End" to go to the beginning and end
of the current buffer respectively, do:
\begin{verbatim}
(rebind-key "Home" nil "\M-<")
(rebind-key "End" nil "\M->")
\end{verbatim}
\subsubsection{How do I bind keys in the numeric keypad on an IBM
Selectric-style
keyboard to their obvious functions (arrow movement, home, end, etc.)?}
Put these lines in your .emacs file:
\begin{verbatim}
(rebind-key "KP_Home" nil "\M-<")
(rebind-key "KP_Up" nil "\C-p")
(rebind-key "KP_Prior" nil "\M-v")
(rebind-key "KP_Left" nil "\C-b")
(rebind-key "KP_Begin" nil "\C-l")
(rebind-key "KP_Right" nil "\C-f")
(rebind-key "KP_End" nil "\M->")
(rebind-key "KP_Down" nil "\C-n")
(rebind-key "KP_Next" nil "\C-v")
\end{verbatim}
NOTE: This makes the keypad arrow keys work, the keypad PgUp/PgDown
work, and the keypad Home/End go to the beginning/end of the buffer.
Other keys appropriate for rebinding in a Selectric-style numeric
keypad include KP_Divide, KP_Multiply, KP_Subtract, KP_Add, KP_Enter,
KP_Insert, and KP_Delete; see below for more details.
\subsubsection{What general facilities does Epoch provide for rebinding function
keys, and how do I use them?}
The rebind-key function allows you to rebind any keycode to a new
string. An example is probably best to show how this works. To make
the key marked "Page Up" (on IBM Selectric-style keyboards) actually
move the current buffer up a page (like M-v), do:
\begin{verbatim}
(rebind-key "Prior" nil "\M-v")
\end{verbatim}
Note that "Prior" is the actual X keysym name for the "Page Up" key;
to see the X keysym names, refer to /usr/include/X11/keysymdef.h (or
$OPENWINHOME/include/X11/keysymdef.h on OpenWindows systems).
(Disregard the leading XK_ in keysymdef.h's definitions for Epoch's
purposes; thus, X11's "XK_Prior" becomes Epoch's "Prior". To find out
which keys are actually active for your keyboard and server, use the
command "xmodmap -pk".)
The standard function keys are named F1 through F12, the function keys
on the left side of a Sun-style keyboard are named L1 through L10, and
so on. The keypad apparently cannot be addressed by KP_0 through KP_9
but must be referenced by names like KP_Left, KP_Up, and so on.
A simple two-step approach for binding function keys to commands
involves binding a key to an arbitrary GNU Emacs key encoding (in the
following example, C-^ k 1) and then binding that encoding to the
command. An example that binds the function key marked "End" to an
arbitrary command (in this case, end-of-line) follows:
\begin{verbatim}
(rebind-key "End" 0 "\C-^k1")
(global-set-key "\C-^k1" 'end-of-line)
\end{verbatim}
Note that the above is only an example of the two-step method; if you
really want "End" to do 'end-of-line, do the obvious instead:
\begin{verbatim}
(rebind-key "End" 0 "\C-e")
\end{verbatim}
The rebind-key command allows modifiers (e.g. shift, control) to be
specified; the following example binds Control-"End" to an arbitrary
command (in this case, end-of-buffer):
\begin{verbatim}
(rebind-key "End" 'control "\C-^Ck1")
(global-set-key "\C-^Ck1" 'end-of-buffer)
\end{verbatim}
For an example of these principles in action, see the file
'amc/keys.el' in the 3.2 contrib directory (which is still up for
anonymous ftp at cs.uiuc.edu as a separate .tar.Z file) or at
ftp.ncsa.uiuc.edu in /outgoing/marca/epoch.
[Thanks to Alan Carroll (carroll@cs.uiuc.edu).]\cindex{Carroll, Alan}
\node How can I stop function keys from putting garbage in my buffer?, How do I turn the keyboard bell off?, How can I use Page Up and Page Down keys?, Keyboard
\cindex{How can I stop function keys from putting garbage in my buffer?}
\cindex{Function keys insert garbage}
\cindex{Garbage from function keys}
\subsection{How can I stop function keys from putting garbage in my
buffer?}
I want Epoch to disregard accidental presses of function keys that
insert spurious characters (e.g., "-1~") into the buffer. Does Epoch
perchance have some magical way to make this happen?
Perchance, Epoch does. The variable epoch::function-key-mapping, if
set to nil, makes Epoch disregard such keys, unless they're explicitly
rebound with rebind-key. You can set this in your .emacs file like
\begin{verbatim}
(setq epoch::function-key-mapping nil)
\end{verbatim}
[Thanks to Alan Carroll (carroll@cs.uiuc.edu).]\cindex{Carroll, Alan}
\node How do I turn the keyboard bell off?, , How can I stop function keys from putting garbage in my buffer?, Keyboard
\cindex{How do I turn the keyboard bell off?}
\cindex{Keyboard bell, turning it off}
\cindex{Bell, turning it off}
\subsection{How do I turn the keyboard bell off?}
The easy answer is to put the following line in your .emacs file:
\begin{verbatim}
(setq epoch::bell-volume -50)
\end{verbatim}
Another possibility, if you like visual bells (i.e., having the
entire edit window flash reverse video instead of hearing an audible
beep), is to put the following in your .emacs file:
\begin{verbatim}
(epoch::set-bell t)
\end{verbatim}
The malicious answer, for those who, like myself, never want to hear
another beep for the rest of time, is to modify src/x11term.c in the
Epoch distribution; just change the line that reads:
\begin{verbatim}
XBell (xs->display,volume);
\end{verbatim}
\begin{verbatim}
/* XBell (xs->display,volume); */
\end{verbatim}
Then recompile.
\node Highlighting, Epoch-Specific Emacs Lisp Packages, Keyboard, Top
\cindex{Highlighting}
\section{Highlighting}
\begin{menu}
* How do I highlight regions of text in a buffer with different styles?::
* Can I use highlighting packages on monochrome displays?::
\end{menu}
\node How do I highlight regions of text in a buffer with different styles?, Can I use highlighting packages on monochrome displays?, , Highlighting
\cindex{How do I highlight regions of text in a buffer with different styles?}
\cindex{Highlighting regions of text}
\cindex{Text highlighting}
\subsection{How do I highlight regions of text in a buffer with
different styles?}
While the current Epoch distribution contain plenty of support for
zones and styles, the enabling mechanisms that make syntax-directed
highlighting possible, no intrinsic support for such highlighting is
provided. This situation may change in subsequent releases of Epoch.
Three packages that provide varying degrees of support for
syntax-directed highlighting are:
\begin{description}
\item[tek-highlight-2.0.tar.Z] (available from archive.cis.ohio-state.edu
or ftp.ncsa.uiuc.edu, see below), which supports comment highlighting
in source code as well as support for the Info documentation browser,
various mail and news packages, and manual pages.
Version 2.1.2 (beta) of tek-highlight is available for anonymous ftp
as /rle-vlsi.mit.edu:pub/tek-highlight-2.1.1.beta.shar or
\xref{How do I highlight regions of text in a buffer with different styles?}
\node Epoch-Specific Emacs Lisp Packages, Other Resources, Highlighting, Top
\cindex{Epoch-Specific Emacs Lisp Packages}
\section{Epoch-Specific Emacs Lisp Packages}
\begin{menu}
* Where can I find Epoch-specific emacs lisp packages?::
* Where can I get a PostScript version of the Epoch manual?::
\end{menu}
\node Where can I find Epoch-specific emacs lisp packages?, Where can I get a PostScript version of the Epoch manual?, , Epoch-Specific Emacs Lisp Packages
\cindex{Where can I find Epoch-specific emacs lisp packages?}
\cindex{Emacs Lisp packages, locations}
\cindex{Finding Emacs Lisp packages for Epoch}
\subsection{Where can I find Epoch-specific emacs lisp packages?}
Try the following anonymous FTP sites for Epoch-specific emacs lisp
packages:
\begin{description}
\item[aix370.rrz.uni-koeln.de (134.95.132.2)]
/gnu/emacs
\item[archive.cis.ohio-state.edu (128.146.8.52)]
/pub/gnu/emacs/elisp-archive/elisp
[This is main elisp-archive site; it is mirrored at
ftp.uu.net (137.39.1.9) in /languages/emacs-lisp, among other places.
Not much Epoch code exists here; in particular, a much more
recent version of hilit.el.Z is at ftp.ncsa.uiuc.edu, below.]
\item[ftp.cs.buffalo.edu (128.205.32.3)]
/pub
[This is the distribution site for the new Dired, which will
be included in Emacs v19; it includes support for Epoch.]
\item[ftp.ncsa.uiuc.edu (141.142.20.50)]
/outgoing/marca/epoch
[This is the previous FAQ maintainer's archive of Epoch code; the
README file gives an overview of what he considers to be
'essential' Epoch packages, and all of those packages
are available there. If he gets out of date on any of
these and you notice it, please let him know.]
\item[icsi-ftp.berkeley.edu (128.32.201.55)]
/pub/elisp
\item[ireq-robot.hydro.qc.ca (131.195.2.130)]
/pub/emacs/lisp
[This is the distribution site for the IMOUSE package.]
\item[wilma.cs.brown.edu (128.148.31.66)]
/pub/hyperbole
[This is the distribution site for the Hyperbole hypertext
system, which includes support for Epoch. Also available
separately from here is the wrolo 'rolodex' package, one of the
components of Hyperbole.]
\end{description}
Also see the contrib tar file found at cs.uiuc.edu, in the same
directory as the actual Epoch distribution.
Also watch the gnu.emacs.sources Usenet newsgroup, as well as the
epoch newsgroup/mailing list (see below).
Please volunteer the names of any sites not on this list.
\node Where can I get a PostScript version of the Epoch manual?, , Where can I find Epoch-specific emacs lisp packages?, Epoch-Specific Emacs Lisp Packages
\cindex{Where can I get a PostScript version of the Epoch manual?}
\cindex{Epoch manual in PostScript}
\cindex{PostScript version of Epoch manual}
\subsection{Where can I get a PostScript version of the Epoch manual?}
Use anonymous ftp to cs.uiuc.edu (128.174.252.1) in
/pub/epoch-files/epoch; get epoch-4.0.epoch-man.ps.Z.
\node Other Resources, Advanced Questions, Epoch-Specific Emacs Lisp Packages, Top
\cindex{Other Resources}
\section{Other Resources}
\begin{menu}
* What Epoch newsgroups/mailing lists are out there?::
* Where do I send bug reports?::
\end{menu}
\node What Epoch newsgroups/mailing lists are out there?, Where do I send bug reports?, , Other Resources
\cindex{What Epoch newsgroups/mailing lists are out there?}
\cindex{Newsgroups}
\cindex{Mailing lists}
\subsection{What Epoch newsgroups/mailing lists are out there?}
The Usenet newsgroup gnu.epoch.misc and the mailing list
epoch@cs.uiuc.edu are one and the same. To join the mailing list,
send a request to epoch-request@cs.uiuc.edu. (It is best to read the
newsgroup if you have access to it, to save on network resources and
the mailing list maintainer's time.)
For more general information about Epoch and GNU Emacs, see the list
of resources at the start of this file.
\node Where do I send bug reports?, , What Epoch newsgroups/mailing lists are out there?, Other Resources
\cindex{Where do I send bug reports?}
\cindex{Bugs, reporting}
\cindex{Reporting bugs}
\subsection{Where do I send bug reports?}
Either post to the newsgroup gnu.epoch.misc, or (equivalently) send
mail to epoch@cs.uiuc.edu (which is the newsgroup).
\node Advanced Questions, Epoch and GNU Emacs, Other Resources, Top
\cindex{Advanced Questions}
\section{Advanced Questions}
[NOTE: This section is at the end since the questions involve actual
source-code hacking or problems with specific machine configurations
that the FAQ moderator cannot personally verify and whose solutions will
probably involve some sort of hacking. If these answers helped you,
please let me know. If I don't hear of people finding these useful, I'm
going to remove them.]
\subsection{Problems with Meta on HPs}
Epoch 4.0b1 (or later) (as well as GNU Emacs 18.58) built
under HP-UX 8.0 and 8.05 apparently don't recognize the Meta key as
Alt. How can this be fixed?
Bob Fisher (bob@fisher.depaul.edu) suggests the following command,
executed once per session, prior to starting Epoch:
\begin{verbatim}
xmodmap -e "clear mod1" \
-e "add mod1 = Meta_R" \
-e "add mod1 = Meta_L"
\end{verbatim}
\subsection{Problems with colors on multiple screens}
Why do all of Epoch's colors go away when Epoch is run on an
X11R5 server with multiple screens?
Dana Chee (dana@thumper.bellcore.com) reports that X11R5 has a new
SCREEN_RESOURCES property that allows/forces colors to only appear for
color screens, but Epoch doesn't look at this property. This bug will
only bite you if you're running on a multi-screen system. If it
happens, there is a workaround; see the xrdb manpage and the xrdb
option '-all'.
\subsection{The cursor disappears sometimes}
Even though Epoch 4.0b1 includes fixes to keep the cursor from
disappearing (as it does on occasion, especially in a shell, in Epoch
4.0b0), the cursor still disappears sometimes. Is there a fix for
this?
First, Epoch 4.0p0 has additional fixes for this problem which
presumably will supersede the fix given below.
According to Michael Thome (mthome@bbn.com), activating the XFlush
code at the end of the CursorToggle routine in 4.0b1's x11term.c seems
to fix the problem. (In other words, '#if 0' on line 737 of x11term.c
should be changed to '#if 1'.)
\subsection{Immediate iconification on startup}
I want Epoch to iconify itself immediately upon starting. To this end,
in my .emacs file I have (epoch::iconify-screen). But most (95%) of the
time this doesn't work. How can I make it work all the time?
The technical explanation appears to be that the initial Epoch
minibuffer and edit screen are unmapped after creation to set some
properties for ICCCM purposes and then remapped, and this interferes
with the iconification process.
One workaround (that may or may not work for you) is to add a sit-for
command to your .emacs file right before epoch::iconify-screen; for
example:
\begin{verbatim}
(sit-for 15)
(epoch::iconify-screen)
\end{verbatim}
[Thanks to Bobby Bodenheimer (bobby@hot.caltech.edu), Simon Kaplan
(kaplan@cs.uiuc.edu), and Chris Love (love@cs.uiuc.edu).]